VÊ se esse te serve...
http://www.xtibia.com/forum/topic/216020-reset-systemstages/?hl=%2Bnpc+%2Breset
By DavyziinC, 08 de jul. de 2013 in Tópicos Sem Resposta
info
Group: Conde
Joined: 27/04/13
Posts: 531
Reputation: +38

VÊ se esse te serve...
http://www.xtibia.com/forum/topic/216020-reset-systemstages/?hl=%2Bnpc+%2Breset
info
Group: Barão
Joined: 06/02/12
Posts: 207
Reputation: +1
Tibia Character: Não lembro :(

neem ta funfando tentei mais neem funfa ;x
Vá em Data>Npc> crie um arquivo .xml e cole isso dentro:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Reseter" script="reset.lua" walkinterval="2000" floorchange="0">
<health now="150" max="150"/>
<look type="115" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Eae |PLAYERNAME| Tudu Blz? Fala reset para resetar seu lvl ou diga resets. Cuidado ao resetar seu level voltara ao 30 e sua velocidade tambem!"/>
</parameters>
</npc>
Agora vá em Data>Npc>Script e crie um arquivo com o nome de reset.lua e cole isso dentro:
-- config
minlevel = 25000 -- level para resetar
price = 500000 -- dinheiro para pagar ao resetar
newlevel = 30 -- level após reset
newexp = 368300 -- nova experiencia após reset
-- end config
function addReset(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,36874,resets+1)
return true
end
function getResets(cid)
resets = getPlayerStorageValue(cid,36874)
if resets < 0 then
resets = 0
end
return resets
end
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'reset') then
selfSay('Do you want to reset your character level? Your character will be logged off if you confirm. You must pay '..price..' gold coins to reset.', cid)
talkState[talkUser] = 1
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then
if getPlayerMoney(cid) < price then
selfSay('You must pay '..price..' gold coins to reset.', cid)
elseif getPlayerLevel(cid) < minlevel then
selfSay('You must be at least level '.. minlevel ..' to reset.', cid)
else
doPlayerRemoveMoney(cid,price)
addReset(cid)
playerid = getPlayerGUID(cid)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")
end
talkState[talkUser] = 0
elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then
talkState[talkUser] = 0
selfSay('Ok.', cid)
elseif msgcontains(msg, 'resets') then
selfSay('You have '..getResets(cid)..' reset(s).', cid)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Creditos:
DevilMooninfo
Group: Barão
Joined: 06/02/12
Posts: 207
Reputation: +1
Tibia Character: Não lembro :(

cara eu não quero npc não eu quero sistema ;x
info
Group: Grão-Duque
Joined: 28/07/11
Posts: 3.5k
Reputation: +570
Gender: Masculino
Tibia Character: Transloko

Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Group: Grão-Duque
Joined: 28/07/11
Posts: 3.5k
Reputation: +570
Gender: Masculino
Tibia Character: Transloko

Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Group: Herói
Joined: 28/11/10
Posts: 3.4k
Reputation: +585
Gender: Masculino

info
Group: Barão
Joined: 06/02/12
Posts: 207
Reputation: +1
Tibia Character: Não lembro :(
Então pessoal eu queria um scripts que quando o player fala !reset da reset no level magic level e no skill alguém pode fazer esse scripts?